package com.lyj.io.module.sys.controller;

import com.lyj.io.annotation.SysLogAnnotation;
import com.lyj.io.common.utils.PageUtils;
import com.lyj.io.common.utils.R;
import com.lyj.io.module.sys.service.SysLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;


/**
 * 日志相关api
 * @author:liyajie
 * @createTime:2022/1/5 11:23
 * @version:1.0
 */
@Api(value = "SysLogController", tags = "日志相关api")
@RestController
@RequestMapping("/api/v1/log")
public class SysLogController {
	@Autowired
	private SysLogService sysLogService;

	/**
	 * 查询日志列表
	 * @author: liyajie
	 * @date: 2022/1/5 15:39
	 * @param params
	 * @return com.lyj.io.common.utils.R
	 * @exception:
	 * @update:
	 * @updatePerson:
	 **/
	@ApiOperation(value = "查询日志列表", notes = "查询日志列表")
	@ResponseBody
	@PostMapping("/getLoglist")
	public R getLoglist(@RequestParam Map<String, Object> params){
		PageUtils page = sysLogService.queryPage(params);
		return R.ok().put("page", page);
	}

}
